package com.android.bind;

import com.android.bind.components.ActivityBind;
import com.android.bind.components.FragmentBind;
import com.android.bind.components.ViewHolderBind;

import android.app.Activity;
import android.content.Context;
import android.support.v4.app.Fragment;
import android.view.View;

/**
 * 视图注入框架
 * 
 * @author quick
 * 
 */
public class QuickBind {

	/**
	 * 适用于activity的视图注入
	 * 
	 * @param activity
	 */
	public static void bind(Activity activity) {
		ActivityBind.bind(activity);
	}

	/**
	 * 适用于Fragment的视图注入
	 * 
	 * @param fragment
	 * @param context
	 * @param view
	 */
	public static void bind(Fragment fragment, Context context) {
		FragmentBind.bind(fragment, context);
	}

	/**
	 * 适用于ViewHolder的视图注入
	 * 
	 * @param obj
	 * @param context
	 * @param view
	 */
	public static void bind(Object obj, View view) {
		ViewHolderBind.bind(obj, view);
	}

}
